﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <script type="text/javascript">
        var a = 4, b = 3, c = 2;
        var disc = (Math.pow(b, 2) - (4 * a * c));
        var singleRoot = (-b) / (2 * a);
        if (disc < 0)
        {
            document.writeln("No real roots!");
        }
        else if (disc == 0)
        {
            document.writeln("The equation has one root and it is " + singleRoot);
        }
        else if (disc > 0)
        {
            var x1 = (-b + Math.sqrt(disc)) / (2 * a);
            var x2 = (-b - Math.sqrt(disc)) / (2 * a);
            document.writeln("The roots are " + x1 + " and " + x2 + ".");
        }
        
    </script>
</body>
</html>
